<template lang="pug">
  el-radio-group.dashboard-form-target(
    v-model="target"
    size="mini")
    el-radio-button(
      v-for="(target, index) of targetList"
      :key="index"
      :label="target.value") {{target.label}}
</template>
·
<script >
/**
 * @name Dashboard 历史数据页面
 * @author 陈可嘉
 * @description 各种指标历史数据的展示
 * @update linmn
 * @description 点击坐标跳转到历史数据页面
 */
export default {
  name: 'DashboardTarget',
  props: {
    value: String,
    targetList: {
      type: Array,
      default: () => ([])
    }
  },
  computed: {
    target: {
      get () {
        return this.value
      },
      set (data) {
        this.$emit('input', data)
      }
    }
  }
}
</script>

<style lang="sass" scoped>
.dashboard-form-target
  label
    margin-bottom: 0
</style>
